<%@ Application Language="C#"%>
<script runat="server">    
    void Application_Start(object sender, EventArgs e) 
    {
        // Code that runs on application startup
        String connectionString = "workstation id=evaluation.mssql.somee.com;packet size=4096;user id=phamtuanchip_SQLLogin_1;pwd=xvvza7dk3p;data source=evaluation.mssql.somee.com;persist security info=False;initial catalog=evaluation";
        String connectionOleDbString = "Provider=SQLOLEDB; workstation id=evaluation.mssql.somee.com;packet size=4096;user id=phamtuanchip_SQLLogin_1;pwd=xvvza7dk3p;data source=evaluation.mssql.somee.com;persist security info=False;initial catalog=evaluation";
        System.Data.SqlClient.SqlConnection myConn = new System.Data.SqlClient.SqlConnection(connectionString);
        System.Data.OleDb.OleDbConnection myOleConn = new System.Data.OleDb.OleDbConnection(connectionOleDbString);
        Application.Add(keyUtils.APP_MYCONN,myConn);
        Application.Add(keyUtils.APP_MYOLECONN, myOleConn);

    }
    
    void Application_End(object sender, EventArgs e) 
    {
        //  Code that runs on application shutdown

    }
        
    void Application_Error(object sender, EventArgs e) 
    { 
        // Code that runs when an unhandled error occurs

    }

    void Session_Start(object sender, EventArgs e) 
    {
      

        // Code that runs when a new session is started
        Session.Add(keyUtils.SES_ISFINISH, false);
        Session.Add(keyUtils.SES_ISLOGOUT, true);
        Session.Add(keyUtils.SES_ISLOGIN, false);
        Session.Add(keyUtils.SES_REMOTEUSER, null);
        Session.Add(keyUtils.SES_COMPANY, null);
        Session.Add(keyUtils.SES_COMPANYID, null);
        Session.Add(keyUtils.SES_SELECTEDTAB, "0");
        
    }

    void Session_End(object sender, EventArgs e) 
    {
        // Code that runs when a session ends. 
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer 
        // or SQLServer, the event is not raised.

    }
       
</script>
